package 曾世昌12_8.zuoye23;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

public class test {
    public static void main(String[] args) throws Exception {
        HashMap<String, String> map = new HashMap<>();
        map.put( "pid", "10" );
        map.put( "name", "张三" );
        map.put( "age", "18" );
        String str = "";
        for (Map.Entry<String, String> entry : map.entrySet()) {
            str += entry.getKey() + "=" + entry.getValue() + "\r\n";
        }
        FileUtils.writeStringToFile( new File( "mapdata.properties" ),str );
    }
}
